/**
 * Created by wenguangjia on 2017/8/31.
 */
(function () {
    'use strict';

    angular
        .module('logcenterApp')
        .controller('esIndexController', esIndexController);
    esIndexController.$inject = ['$scope', 'searchService','$sce'];
    function esIndexController($scope, searchService,$sce) {
        searchService.queryCluster().then(function(resp){
            $scope.source=resp.data;
            $scope.clusterName = $scope.source[0].name;
            $scope.clusterAddr = $scope.source[0].indexAddr;
            $scope.src = $sce.trustAsResourceUrl($scope.clusterAddr);
        },function(error){});

        // $scope.selectShow = function(item){
        //     $scope.win.close();
        //     $scope.clusterName = item.name;
        //     $scope.src = $sce.trustAsResourceUrl(item.statusAddr);
        // }

    }


})();
